import request from '@/utils/request'

export function fetchUserRoles(params) {
  return request({
    url: '/api/v1/userRoles',
    method: 'get',
    params
  })
}

export function fetchAddUserRoles(params) {
  return request({
    url: '/api/v1/userRoles/getUsers',
    method: 'get',
    params
  })
}

// 批量删除建议使用post请求基于body传递参数
export function deleteUserRoles(data) {
  return request({
    url: '/api/v1/deleteUserRoles',
    method: 'post',
    data
  })
}

export function addUserRole(data) {
  return request({
    url: '/api/v1/userRoles',
    method: 'post',
    data
  })
}
